package com.paw.distribute.session.controller;

import javax.servlet.http.HttpServletRequest;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author lvzihai
 * @date 2021/6/17
 **/
@Slf4j
@Controller
public class HomeController {

  @Value("${server.port:8080}")
  private Integer port;

  @GetMapping("/index")
  public String index(HttpServletRequest request){
    String sessionId = request.getSession().getId();
    log.info("HomeController index port {} sessionId: {}",port,sessionId);

    return "index";
  }
}
